package org.aeon.gamechatnest.mapper;

import org.aeon.gamechatnest.dto.AuthoritySearchDto;
import org.aeon.gamechatnest.dto.AuthorityVo;
import org.aeon.gamechatnest.pojo.Role;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author 89342
 * @description 针对表【authority(服务器权限表)】的数据库操作Mapper
 * @createDate 2024-05-09 09:25:50
 * @Entity org.aeon.gamechatnest.pojo.Authority
 */
@Mapper
public interface AuthorityMapper {
    /**
     * 根据角色id查询权限字符串
     *
     * @param roles
     * @return
     */
    List<String> getAuthorityCodeByRoleIds(@Param("roles") List<Role> roles);

    /**
     * 根据查询条件查询
     *
     * @param authoritySearchDto
     * @return
     */
    List<AuthorityVo> get(AuthoritySearchDto authoritySearchDto);

    /**
     * 根据角色id查询权限
     * <联表查询
     *
     * @param roleId
     * @return
     */
    List<AuthorityVo> getByRoleId(Long roleId);
}




